/*
 * Copyright 2010 Joshua Smith and Nelson Llewellyn
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package norse.view;

import norse.model.NorseJfxScan;
import norse.view.freyja.FreyjaNullHost;


/**
 * Base class for Norse views.
 */
public abstract class NorseView {

        public var selectedHost:NorseViewHost = FreyjaNullHost{};
        public abstract function show():Void;
        public abstract function modelToView(model:NorseJfxScan) : NorseViewHost[];

    // TODO replace this with something smarter
    // combine nextX and nextY into nextPosition and take into account
    // what is already on the page when passing out the next value
    def xValues = [500, 600, 500, 600, 700, 800, 700, 800];
    var whichX = 0;
    def yValues = [100, 200, 300, 400, 100, 200, 300, 400];
    var whichY = 0;

    public function nextX():Number {
        return xValues[whichX++];
    }
    public function nextY():Number {
        return yValues[whichY++];
    }



}
